//
//  Game_CenterViewController.h
//  Game Center
//
//  Copyright BooLooLeeLoo Studio. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <GameKit/GameKit.h>

#import "GameCenterManager.h"


@class GameCenterManager;

@interface LittleBallGameCenterViewController : UIViewController <UIActionSheetDelegate, GKLeaderboardViewControllerDelegate, GKAchievementViewControllerDelegate, GameCenterManagerDelegate> {
	
	
	GameCenterManager *gameCenterManager;
    IBOutlet UILabel *currentScoreLabel;
	
	int64_t  currentScore;
	
	NSString* currentLeaderBoard;
	
    NSLock *writeLock;
    
    double achievementsPercentageComplete;
    
    NSString* identifier;
}

@property (nonatomic, retain) GameCenterManager *gameCenterManager;
@property (nonatomic, assign) int64_t currentScore;
@property (nonatomic, retain) NSString* currentLeaderBoard;
@property (nonatomic, retain) UILabel* currentScoreLabel;


@property (readonly, nonatomic) NSString *storedScoresFilename;
@property (readonly, nonatomic) NSMutableArray * storedScores;


- (void)storeScore:(GKScore *)score ;
- (void)resubmitStoredScores;
- (void)writeStoredScore;
- (void)loadStoredScores;
- (void)submitScore:(GKScore *)score ;


- (IBAction) reset;
- (IBAction) showLeaderboard;
- (IBAction) showAchievements;

- (IBAction) backToFatherView:(id)sender;

- (void) checkAchievements;
- (void) submitAchievement:(GKAchievement *)achievement;

@end
